package com.so206.po;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class SysTrRecord implements Serializable {
    private Long id;

    /**
    * 转账人
    */
    private Long srcId;

    /**
    * 收款人
    */
    private Long dstId;

    /**
    * 转账金额
    */
    private BigDecimal money;

    /**
    * 状态:0.失败,1.成功,2.审核中
    */
    private Integer status;

    private Date createTime;

    /**
    * 操作人
    */
    private Long optUser;

    /**
    * 转账单号
    */
    private String tId;

    /**
    * 转账留言
    */
    private String tContext;

    /**
    * 类型:0.支出,1.收入
    */
    private Integer type;

    /**
    * 关联id
    */
    private Long parentId;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getSrcId() {
        return srcId;
    }

    public void setSrcId(Long srcId) {
        this.srcId = srcId;
    }

    public Long getDstId() {
        return dstId;
    }

    public void setDstId(Long dstId) {
        this.dstId = dstId;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getOptUser() {
        return optUser;
    }

    public void setOptUser(Long optUser) {
        this.optUser = optUser;
    }

    public String gettId() {
        return tId;
    }

    public void settId(String tId) {
        this.tId = tId;
    }

    public String gettContext() {
        return tContext;
    }

    public void settContext(String tContext) {
        this.tContext = tContext;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", srcId=").append(srcId);
        sb.append(", dstId=").append(dstId);
        sb.append(", money=").append(money);
        sb.append(", status=").append(status);
        sb.append(", createTime=").append(createTime);
        sb.append(", optUser=").append(optUser);
        sb.append(", tId=").append(tId);
        sb.append(", tContext=").append(tContext);
        sb.append(", type=").append(type);
        sb.append(", parentId=").append(parentId);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysTrRecord other = (SysTrRecord) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getSrcId() == null ? other.getSrcId() == null : this.getSrcId().equals(other.getSrcId()))
            && (this.getDstId() == null ? other.getDstId() == null : this.getDstId().equals(other.getDstId()))
            && (this.getMoney() == null ? other.getMoney() == null : this.getMoney().equals(other.getMoney()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getOptUser() == null ? other.getOptUser() == null : this.getOptUser().equals(other.getOptUser()))
            && (this.gettId() == null ? other.gettId() == null : this.gettId().equals(other.gettId()))
            && (this.gettContext() == null ? other.gettContext() == null : this.gettContext().equals(other.gettContext()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getSrcId() == null) ? 0 : getSrcId().hashCode());
        result = prime * result + ((getDstId() == null) ? 0 : getDstId().hashCode());
        result = prime * result + ((getMoney() == null) ? 0 : getMoney().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getOptUser() == null) ? 0 : getOptUser().hashCode());
        result = prime * result + ((gettId() == null) ? 0 : gettId().hashCode());
        result = prime * result + ((gettContext() == null) ? 0 : gettContext().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode());
        return result;
    }
}